<template>
    <div class="propo_box" v-loading="signalsRadio1.loading" element-loading-text="加载中...">
        <div style="padding: 0 20px; min-height: 200px;" v-if="signalsRadio1.total > 0">
            <div class="prop" v-for=" item in signalsRadio1.proposedLiss">
                <div>
                    <span class="proptitle" @click="titleClick(item.nid)" v-html="item.title"></span>
                    <span v-for="i in item.tags" :key="i"><span v-if="i != ''" class="propActive">{{ i }}</span></span>
                </div>
                <div class="prop_cen">
                    <div class="prop_cen_one">
                        <div class="propcolor">业主单位</div>
                        <div>{{ item.xmdw != '' ? item.xmdw : '-' }}</div>
                    </div>
                    <div class="prop_cen_two">
                        <div style="width: 144px;color: #9b9eac;">{{ timestamp(item.release_time) }}</div>
                        <div style="width: 144px;color: #9b9eac;">{{ diqu(item.provinceid) }}</div>
                        <div style="width: 144px;"></div>
                    </div>
                </div>
            </div>
        </div>
        <Pagination ref="pagination" />
        <Vips v-if="signalsRadio1.proposedLiss.proposedLiss > 0" />
    </div>
    <div v-if="signalsRadio1.proposedLiss.proposedLiss == 0" style="background-color: white; margin: 15px 0;">
        <el-empty description="暂无数据" />
    </div>
</template>

<script setup>
import { timestamp, diqu } from "@/utils/index";
import { useRadio1Store } from "@/pain/search/search";
import Pagination from '@/components/pagination/index.vue';
import Vips from "@/components/vipts/index.vue";
import { useCounterStore } from "@/pain/login/login";
import { useRouter } from "vue-router";
const signalsRadio1 = useRadio1Store();
const useRouters = useCounterStore()
const router = useRouter();

const titleClick = (nid) => {
    if (!localStorage.getItem("token")) {
        return useRouters.uselogin = true
    }
    const href = router.resolve({
        path: `/searchInfo/${nid}`,
    });
    window.open(href.href, "_blank");
}

const xqtiaozhuan = () => {
    if (router.currentRoute.value.query.id == '6') {
        signalsRadio1.getprojects();
    }

}
xqtiaozhuan()
</script>

<style lang="scss" scoped>
.propActive {
    display: inline-block;
    height: 20px;
    line-height: 20px;
    padding: 0 9px;
    margin-left: 10px;
    background-color: #f5f5f5;
    border-radius: 3px;
    font-size: 12px;
    color: #A9b1be;
}

.propcolor {
    color: #9b9eac;
    padding-right: 15px;
}

.origin {
    padding: 5px 6px;
    border-radius: 4px;
    background-color: #FE8D03;
    color: #fff;
    margin-left: 10px;
    font-size: 14px;
}

.propo_box {

    background-color: #fff;

    // 
    .prop {
        // display: flex;
        padding: 20px 0;
        border-bottom: 1px solid #EEEEEE;
        cursor: pointer;

        .proptitle {
            display: inline-block;
            width: 500px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        &:hover {
            color: #FE8D03;
        }


        .prop_cen {
            display: flex;
            justify-content: space-between;
            margin-top: 32px;

            .prop_cen_one {
                display: flex;
                font-size: 14px;
            }

            .prop_cen_two {
                display: flex;
                font-size: 14px;
            }
        }
    }



}
</style>